﻿using System.Collections;
using System.Collections.Generic;

using Dict.DataModel;
namespace Dict.Blo
{
    public class DictTreasureBlo
    {
        public static TableTreasure GetTableTreasure(string treasureId)
        {
            return Dict.DictDataManager.Instance.tableTreasureDao.GetById(treasureId);
        }

        public static List<TableTreasure> GetMustShowTreasure()
        {
            List<TableTreasure> all = Dict.DictDataManager.Instance.tableTreasureDao.CacheList;
            List<TableTreasure> res = new List<TableTreasure>();
            for(int i = 0; i < all.Count;++i)
            {
                if(all[i].alwaysShow == 1)
                {
                    res.Add(all[i]);
                }
            }
            return res;
        }

        public static List<TableTreasure> GetTableTreasureAll()
        {
            return Dict.DictDataManager.Instance.tableTreasureDao.CacheList;
        }
    }
}
